package com.vueblog.webapi.enums;

/**
 * <p>
 * 返回状态码
 * </p>
 *
 * @author intest
 * @since 2019-07-22
 */
public enum ResponseEnum {
    SUCCESS(0, "response.success"),
    ERROR(-1, "response.fail"),
    SYSTEM_ERROR(-2, "response.error500"),
    BAD_REQUEST(-3, "response.parameter.error"),
    NOT_FOUND(-4, "response.error404"),
    CONNECTION_ERROR(-5, "response.network.error"),
    DATABASE_ERROR(-6, "response.database.error"),
    BOUND_STATEMENT_NOT_FOUNT(-7, "response.notfind.mybatis.method"),
    ERROR_REQUEST(-8,"response.commandpackage.empty"),
    UNSUPPORTED_CHARACTERS(-9, "response.character.illegal"),
    TOKEN_EXPIRED(100, "response.token.expired"),
    TOKEN_INVALID(101, "response.token.invalid"),
    TOKEN_ERROR(101, "response.token.parse.error"),
    TOKEN_NOT_FOUNT(101, "response.token.empty"),
    TOKEN_TYPE_ERROE(101, "response.token.typeerror"),
    CURRENTUSER_NOT_FOUNT(101, "response.user.empty"),
    JOB_NOT_FOUNT(101, "response.job.empty"),
    JOB_STATUS_ERROR(101, "response.job.statuserror"),
    LOGIN_VERIFYCODE_ERROR(201, "response.verification.error"),
    LOGIN_NOT_FOUNT(202, "response.loginname.notexist"),
    LOGIN_IS_DISABLED(203, "response.user.disabled"),
    LOGIN_IS_EXPIRED(204, "response.user.expired"),
    LOGIN_IS_LOCKED(205, "response.user.locked"),
    LOGIN_PASSWORD_ERROR(206, "response.user.password.error"),
    LOGIN_NAME_ERROR(207, "response.user.loginname.error"),
    LOGIN_RIGHT_ERROR(208, "response.user.rights.changed");


    private Integer code;
    private String message;

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
